package com.aivin.firplugin.tool;

import java.io.FileWriter;
import java.io.IOException;
import java.util.Properties;

public class StoreTool {
    public static void properties_store(String classPath, String propertyName, String propertyValue) {
        Properties prop = new Properties();
        prop.setProperty(propertyName, propertyValue);
        //这里直接在方法内new 输出流对象，就不用关闭流，因为方法执行完后会自动释放资源
        try {
            prop.store(new FileWriter(classPath), " new data");
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
